<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
    <meta charset="UTF-8">
    <title>${order_template.tepName}订单填写</title>

    <link rel="stylesheet" href="http://119.45.55.14/html//css/jquery-weui.css" />
    <link href="http://119.45.55.14/html//css/bootstrap.min.css" rel="stylesheet" />
    <script src="http://119.45.55.14/html/js/jquery-2.0.3.min.js"></script>
    <script src="http://119.45.55.14/html/js/bootstrap.min.js"></script>
    <script src="http://119.45.55.14/html/plugin/layer/layer.min.js"></script>
    <link rel="stylesheet" href="http://119.45.55.14/html//css/iconfont.css" />
</head>
<body>
<div class="row row-body" style="background-color: rgba(0, 255, 255, 0.24) !important; ;">
    <div class="col-xs-12" style="margin-top: 20px;">
        <div class="col-xs-12 text-center" style="color:#ff6a00;">
            <h2>订单填写</h2>
        </div>

        <div class="form-horizontal">
            <input class="hide" name="uid" id="uid"  value="${order_template.uid}"/>
            <label class="control-label col-sm-1 no-padding-right">填写订单</label>
            <div class="col-sm-2">
                <input class="form-control" name="orderId" id="orderId" type="text"
                       placeholder="订单id..."/>
            </div>
            <#if order_template.whetherShopNameSwitch == 0>
            <label class="control-label col-sm-1 no-padding-right">填写店铺名称</label>
            <div class="col-sm-2">
                <input class="form-control" name="company" id="company" type="text"
                       placeholder="店铺名称..."/>
            </div>
            </#if>
            <label class="control-label col-sm-1 no-padding-right">支付金额</label>
            <div class="col-sm-2">
                <input class="form-control" name="money" id="money" type="text" placeholder="请输入支付金额..."/>
            </div>
            <#if order_template.whetherTaobaoIdSwithc == 0>
            <label class="control-label col-sm-1 no-padding-right">填写淘宝旺铺号</label>
            <div class="col-sm-2">
                <input class="form-control" name="taobaoId" id="taobaoId" type="text" placeholder="淘宝旺铺号..."  />
            </div>
            </#if>

            <label class="control-label col-sm-1 no-padding-right"> </label>
            <div class="col-sm-2">
                <button id="btnSearch" class="btn btn-primary btn-sm" type="button">
                    <i class="fa fa-search"></i>提交订单
                </button>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    $(function(){
        var url = window.location.host;
        var urls = window.location.href;
        $(".row-body").height($(window).height());


        $("#btnSearch").click( function () {
            if (urls.indexOf("p=")<0) {
                layer.msg("非法提交！", {icon: 5});
                return
            }
            debugger
            var key = urls.substr(urls.indexOf("p=")+2,urls.length);
            var taobaoId=$("#taobaoId").val();
            var money=$("#money").val();
            var company=$("#company").val();
            var shopName=$("#shopName").val();
            var  orderId=$("#orderId").val();
            $.ajax({
                type : "POST",
                url :"http://"+ url+"/shop_util/admin/applyOrder",
                dataType : "json",
                data: {"key": key, "taobaoId": taobaoId, "company": company, "money": money, "shopName": shopName,"orderId":orderId},
                success : function(data) {
                    if (data.success) {
                        layer.msg(data.message, {icon: 1});
                        $("#taobaoId").val("");
                        $("#money").val("");
                        $("#company").val("");
                        $("#shopName").val("");
                        $("#orderId").val("");
                    }else {
                        layer.msg(data.message, {icon: 5});
                    }
                }
            });
        });
    });

</script>
</html>